home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* The Opus Computer-Based Conversation System */
- /* (c) Copyright 1987, Wynn Wagner III, All Rights Reserved */
- /* */
- /* YOOHOO is a trademark of Wynn Wagner III */
- /* */
- /* YOOHOO-YOOHOO/2U2 is */
- /* Copyright 1987, Wynn Wagner III, All Rights Reserved */
- /* */
- /* */
- /* BinkleyTerm Password Processor */
- /* */
- /* */
- /* This module is a very simple FOSSIL-based terminal emulator. It is */
- /* provided for your information only. You will find routines that need */
- /* to be coded and identifiers to be resolved. It has been previously */
- /* known as "OpusLink" and "OConnect". The use of the name "BinkleyTerm" */
- /* does not preclude the possibility that another "OpusLink" or "OConnect" */
- /* could be released. */
- /* */
- /* There is absolutely no guarantee that anything here will work. If you */
- /* break this routine, you own both pieces. */
- /* */
- /* USAGE: You may use this material in any program with no obligation */
- /* as long as there is no charge for your program. For more */
- /* information about commercial use, contact the "OPUSinfo HERE" */
- /* BBS (124/111). */
- /* */
- /* */
- /*--------------------------------------------------------------------------*/
-
- #include <signal.h>
- #include <ctype.h>
- #include <conio.h>
-
- #define WAZOO_SECTION
- #include "zmodem.h"
-
- #include "com.h"
-
- static char *snitty_message = "Sorry, Charlie.";
-
- /*--------------------------------------------------------------------------*/
- /* N PASSWORD */
- /*--------------------------------------------------------------------------*/
- n_password( theirs, ours )
- char *theirs;
- char *ours;
- begin
- if (theirs[0])
- begin
- fancy_str( theirs );
- fancy_str( ours );
-
- if (strnicmp(theirs,ours,6))
- begin
- register int i;
-
- status_line( "!Pwd Err (%d/%d): %s/%s",
- remote_net,
- remote_node,
- theirs,
- ours
- );
-
- SENDCHARS (snitty_message, strlen (snitty_message), 0);
-
- while (!OUT_EMPTY())
- time_release();
-
- return 1;
- end
-
- status_line("*Password-protected session");
- strncpy(theirs,ours,8);
- theirs[6] = '\0';
- end
-
- return 0;
-
- end
-
-
- /*--------------------------------------------------------------------------*/
- /* N GET PASSWORD */
- /* Find the nodelist entry for this system and point remote_password at */
- /* its password if any */
- /*--------------------------------------------------------------------------*/
- n_getpassword(net,node)
- int net,node;
- {
- int limit;
- char *c;
- extern char *remote_password;
- extern struct _node nodedes; /* desc. of node */
- if (( net != nodedes.net) /* If we don't have it yet */
- || (node != nodedes.number)) /* we'll have to get it ... */
- {
- if (!nodefind(net,node)) /* find the node in the list*/
- {
- remote_password = NULL;
- return(0); /* return failure if can't */
- }
- }
- c = nodedes.city; /* Point to start of city */
- limit = 37; /* No password if this = 0 */
- while (limit--) /* Enforce that limit */
- {
- if (*c++ != '\0') /* If not at end of city, */
- continue; /* go on to next character */
- if (*c++ != '!') /* End of city, got '!' ?? */
- break; /* No, treat like a failure */
- remote_password = c; /* Got it, point to it */
- return(1); /* Exit with success code */
- }
- remote_password = NULL; /* No password, say that */
- return(1); /* Successful attempt */
- }